// 判断时间不足10的前面加0
function judgeDate(date) {
  if (date < 10) {
    return '0' + date
  } else {
    return date
  }
}
// 时间格式
function dateFormat(date) {
  date = new Date(date)
  const year = date.getFullYear()
  const month = judgeDate(date.getMonth() + 1)
  const day = judgeDate(date.getDate())
  const hours = judgeDate(date.getHours())
  const minutes = judgeDate(date.getMinutes())
  const seconds = judgeDate(date.getSeconds())
  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}

export default 
